home *** CD-ROM | disk | FTP | other *** search
/ Giga Games 1 / Giga Games.iso / net / usenet / volume7 / gb2 / patch2 < prev    next >
Encoding:
Internet Message Format  |  1989-09-18  |  7.7 KB

  1. Path: uunet!zephyr.ens.tek.com!tekgen!tekred!saab!billr
  2. From: billr@saab.CNA.TEK.COM (Bill Randle)
  3. Newsgroups: comp.sources.games
  4. Subject: v08i030:  GB2 - Galactic Bloodshed, an empire-like war game [Ver. 1.0], Patch2
  5. Message-ID: <4587@tekred.CNA.TEK.COM>
  6. Date: 18 Sep 89 13:30:26 GMT
  7. Sender: news@tekred.CNA.TEK.COM
  8. Lines: 284
  9. Approved: billr@saab.CNA.TEK.COM
  10.  
  11. Submitted-by: VANCLEEF@ohstpy.mps.ohio-state.edu
  12. Posting-number: Volume 8, Issue 30
  13. Archive-name: GB2/Patch2
  14. Patch-To: GB2: Volume 7, Issue 44-51
  15.  
  16.     [This corrects a sprintf bug in doplanet.c and updates the
  17.      Makefile properly (the previous patch was completely wrong).
  18.         -br]
  19.  
  20. #! /bin/sh
  21. # This is a shell archive.  Remove anything before this line, then unpack
  22. # it by saving it into a file and typing "sh file".  To overwrite existing
  23. # files, type "sh file -c".  You can also feed this as standard input via
  24. # unshar, or by typing "sh <file", e.g..  If this archive is complete, you
  25. # will see the following message at the end:
  26. #        "End of shell archive."
  27. # Contents:  patches02
  28. # Wrapped by billr@saab on Mon Sep 18 06:37:05 1989
  29. PATH=/bin:/usr/bin:/usr/ucb ; export PATH
  30. if test -f 'patches02' -a "${1}" != "-c" ; then 
  31.   echo shar: Will not clobber existing file \"'patches02'\"
  32. else
  33. echo shar: Extracting \"'patches02'\" \(6133 characters\)
  34. sed "s/^X//" >'patches02' <<'END_OF_FILE'
  35. X*** ../../GB2/doplanet.c    Fri Sep 15 08:44:12 1989
  36. X--- doplanet.c    Mon Sep 18 06:19:27 1989
  37. X***************
  38. X*** 332,338 ****
  39. X  
  40. X  while (Getxysect(planet, &x, &y, 0)) {
  41. X         p = &Sector(*planet,x,y);
  42. X- 
  43. X         if (p->amoeba) {
  44. X          planet->info[1-1].numsectsowned++;
  45. X          allamoeba &= 1;
  46. X--- 332,337 ----
  47. X***************
  48. X*** 608,613 ****
  49. X--- 607,613 ----
  50. X      /* deal with enslaved planets */
  51. X     if (planet->slaved_to) {
  52. X      if (populations[planet->slaved_to] >= planet->popn * 0.001) {
  53. X+         printf("enslaved!\n");
  54. X          for (i=1; i<=Num_races; i++)
  55. X              /* add production to slave holder of planet */
  56. X            if (planet->info[i-1].numsectsowned) {
  57. X***************
  58. X*** 620,631 ****
  59. X            }
  60. X      } else {
  61. X           /* slave revolt! */
  62. X! 
  63. X           /* first nuke some random sectors from the revolt */
  64. X          i = planet->popn / 10000 + 1;
  65. X          while (--i) {
  66. X!             p = &Sector(*planet,int_rand(0,planet->Maxx),
  67. X!                     int_rand(0,planet->Maxy));
  68. X              if (p->popn) {
  69. X                  p->owner = p->popn = 0;
  70. X                  p->is_wasted = 1;
  71. X--- 620,632 ----
  72. X            }
  73. X      } else {
  74. X           /* slave revolt! */
  75. X!     printf("slave revolt!\n");
  76. X           /* first nuke some random sectors from the revolt */
  77. X          i = planet->popn / 10000 + 1;
  78. X+     printf("i %d  Maxx %d  Maxy %d\n",i,planet->Maxx,planet->Maxy);
  79. X          while (--i) {
  80. X!             p = &Sector(*planet,int_rand(0,planet->Maxx-1),
  81. X!                     int_rand(0,planet->Maxy-1));
  82. X              if (p->popn) {
  83. X                  p->owner = p->popn = 0;
  84. X                  p->is_wasted = 1;
  85. X***************
  86. X*** 636,642 ****
  87. X          while (Getxysect(planet, &x, &y, 0)) {
  88. X              p =  &Sector(*planet,x,y);
  89. X              if (p->owner==planet->slaved_to) {
  90. X!                 p->owner = p->popn = 0;
  91. X                  p->is_wasted = 1;
  92. X              }
  93. X          }
  94. X--- 637,644 ----
  95. X          while (Getxysect(planet, &x, &y, 0)) {
  96. X              p =  &Sector(*planet,x,y);
  97. X              if (p->owner==planet->slaved_to) {
  98. X!                 p->owner = 0;
  99. X!                 p->popn = 0;
  100. X                  p->is_wasted = 1;
  101. X              }
  102. X          }
  103. X***************
  104. X*** 647,653 ****
  105. X          teleg_add(buf, telegram_buf);
  106. X          teleg_add("\nThere has been a SLAVE REVOLT on this planet!\n",
  107. X              telegram_buf);
  108. X!         sprintf(buf,"%s on the planet have all been killed!\n");
  109. X          teleg_add(buf,telegram_buf);
  110. X          teleg_add("Productions now go to their rightful owners.\n",
  111. X              telegram_buf);
  112. X--- 649,655 ----
  113. X          teleg_add(buf, telegram_buf);
  114. X          teleg_add("\nThere has been a SLAVE REVOLT on this planet!\n",
  115. X              telegram_buf);
  116. X!         sprintf(buf,"All population belonging to player #%d on the planet have been killed!\n",planet->slaved_to);
  117. X          teleg_add(buf,telegram_buf);
  118. X          teleg_add("Productions now go to their rightful owners.\n",
  119. X              telegram_buf);
  120. X*** ../../GB2/Makefile    Fri Sep 15 08:44:04 1989
  121. X--- Makefile    Mon Sep 18 06:27:58 1989
  122. X***************
  123. X*** 1,5 ****
  124. X  # Galactic Bloodshed (Robert Chansky, smq@b)
  125. X! # Makefile
  126. X  
  127. X  # what version of UNIX we are running on.
  128. X  UV = VER_4_3
  129. X--- 1,5 ----
  130. X  # Galactic Bloodshed (Robert Chansky, smq@b)
  131. X! # Makefile              (modified by billr@saab.cna.tek.com, 4/26/89)
  132. X  
  133. X  # what version of UNIX we are running on.
  134. X  UV = VER_4_3
  135. X***************
  136. X*** 6,13 ****
  137. X  #UV = VER_4_2
  138. X  # You might want to get rid of the -pipe -g, since these are for development. 
  139. X  CFLAGS = -D$(UV) -pipe -g 
  140. X! #-D$(UV) -O
  141. X  
  142. X  # objects for shell
  143. X  SHOBJS =  getplace.o    \
  144. X      read_teleg.o    \
  145. X--- 6,19 ----
  146. X  #UV = VER_4_2
  147. X  # You might want to get rid of the -pipe -g, since these are for development. 
  148. X  CFLAGS = -D$(UV) -pipe -g 
  149. X! #CFLAGS = -D$(UV) -g 
  150. X! #CFLAGS = -D$(UV) -O
  151. X  
  152. X+ # destination directories
  153. X+ # GLIB should match the directory in the PATH macro of files.h
  154. X+ GBIN = /usr/games
  155. X+ GLIB = /usr/games/lib/GB
  156. X+ 
  157. X  # objects for shell
  158. X  SHOBJS =  getplace.o    \
  159. X      read_teleg.o    \
  160. X***************
  161. X*** 14,19 ****
  162. X--- 20,26 ----
  163. X      autoreport.o    \
  164. X      shootblast.o    \
  165. X      docommand.o    \
  166. X+     explore.o    \
  167. X      telegram.o    \
  168. X      mobiliz.o    \
  169. X      shlmisc.o    \
  170. X***************
  171. X*** 23,28 ****
  172. X--- 30,36 ----
  173. X      autoshoot.o    \
  174. X      dosector.o    \
  175. X      relation.o    \
  176. X+     enslave.o    \
  177. X      doturn.o    \
  178. X      doship.o    \
  179. X      zoom.o        \
  180. X***************
  181. X*** 77,82 ****
  182. X--- 85,92 ----
  183. X      makeplanet.o    \
  184. X      shootblast.o    \
  185. X      autoshoot.o    \
  186. X+     moveship.o    \
  187. X+     explore.o    \
  188. X      relation.o    \
  189. X      dosector.o    \
  190. X      declare.o    \
  191. X***************
  192. X*** 104,109 ****
  193. X--- 114,120 ----
  194. X      shootblast.o    \
  195. X      makeplanet.o    \
  196. X      examine.o    \
  197. X+     enslave.o    \
  198. X      launch.o    \
  199. X      build.o        \
  200. X      order.o        \
  201. X***************
  202. X*** 179,188 ****
  203. X  ${VOBJS}: vars.h
  204. X  ${SHIPOBJS}: vars.h ships.h
  205. X  ${FOBJS}: files.h
  206. X  moveship.o : vars.h ships.h shipdata.h
  207. X  doturn.o doplanet.o power.o doship.o files_shl.o makeuniv.o : power.h
  208. X  #sizes : vars.h ships.h races.h
  209. X! #    cc sizes.c
  210. X  
  211. X  
  212. X  # make data files program
  213. X--- 190,200 ----
  214. X  ${VOBJS}: vars.h
  215. X  ${SHIPOBJS}: vars.h ships.h
  216. X  ${FOBJS}: files.h
  217. X+ ${NOOBJS}: tweakables.h
  218. X  moveship.o : vars.h ships.h shipdata.h
  219. X  doturn.o doplanet.o power.o doship.o files_shl.o makeuniv.o : power.h
  220. X  #sizes : vars.h ships.h races.h
  221. X! #     sizes.c
  222. X  
  223. X  
  224. X  # make data files program
  225. X***************
  226. X*** 193,199 ****
  227. X  # the daemon
  228. X  GB_daemon : ${DOBJS}
  229. X      cc -o GB_daemon ${DOBJS}  -lm
  230. X! doturn.o doship.o doplanet.o : doturn.h
  231. X  
  232. X  # more clone
  233. X  mor : more.c
  234. X--- 205,211 ----
  235. X  # the daemon
  236. X  GB_daemon : ${DOBJS}
  237. X      cc -o GB_daemon ${DOBJS}  -lm
  238. X! doturn.o doship.o doplanet.o moveship.o moveplanet.o : doturn.h
  239. X  
  240. X  # more clone
  241. X  mor : more.c
  242. X***************
  243. X*** 200,205 ****
  244. X--- 212,218 ----
  245. X      cc -o mor more.c
  246. X  
  247. X  chmod:
  248. X+     cd $(GLIB)
  249. X      chmod ag+xs GB
  250. X      chmod g+rwx Data Data/* Data/Tele/*
  251. X      chmod a+rx Docs Docs/*
  252. X***************
  253. X*** 208,213 ****
  254. X--- 221,227 ----
  255. X  #    chmod ga+rwx Data Data/* Data/Tele/*
  256. X  
  257. X  start:
  258. X+     cd $(GLIB)
  259. X      /bin/rm -f Data/spitup
  260. X      GB_daemon \>\& Data/spitup
  261. X  
  262. X***************
  263. X*** 244,252 ****
  264. X  # install the game for public use.
  265. X  install:
  266. X      make
  267. X!     mkdir Docs
  268. X!     mv *.doc Docs
  269. X!     compress Docs/* enroll.dat
  270. X      makeuniv < planet.list
  271. X      make chmod
  272. X  
  273. X--- 258,270 ----
  274. X  # install the game for public use.
  275. X  install:
  276. X      make
  277. X!         cp GB $(GBIN)
  278. X!         -mkdir $(GLIB)
  279. X!         cp exam.dat enroll.dat $(GLIB)
  280. X!         -mkdir $(GLIB)/Docs
  281. X!         -cp Docs/* $(GLIB)/Docs
  282. X!         -compress $(GLIB)/Docs/* $(GLIB)/enroll.dat
  283. X!         make clear
  284. X      makeuniv < planet.list
  285. X      make chmod
  286. X  
  287. END_OF_FILE
  288. if test 6133 -ne `wc -c <'patches02'`; then
  289.     echo shar: \"'patches02'\" unpacked with wrong size!
  290. fi
  291. # end of 'patches02'
  292. fi
  293. echo shar: End of shell archive.
  294. exit 0
  295.